package com.eshop.modules.aop;

import org.slf4j.LoggerFactory;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Pointcut;
import org.slf4j.Logger;
import org.springframework.stereotype.Component;
import org.aspectj.lang.annotation.Aspect;

@Aspect
@Component
public class ForbidSubmitAspect
{
    private static final Logger log;
    
    @Pointcut("@annotation(forbidSubmit)")
    public void pointCut(final ForbidSubmit forbidSubmit) {
    }
    
    @Around("pointCut(forbidSubmit)")
    public Object around(final ProceedingJoinPoint pjp, final ForbidSubmit forbidSubmit) throws Throwable {
        return pjp.proceed();
    }
    
    static {
        log = LoggerFactory.getLogger((Class)ForbidSubmitAspect.class);
    }
}
